<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico">  <link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__STATIC__/layout/css/font-awesome.css?v=4.4.0" rel="stylesheet">
     <link rel="stylesheet" type="text/css" href="__STATIC__/layout/css/plugins/webuploader/webuploader.css">
    <link rel="stylesheet" type="text/css" href="__STATIC__/layout/css/demo/webuploader-demo.css">
    <!-- jqgrid-->
    <link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__STATIC__/layout/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
    <link rel="stylesheet" href="__STATIC__/layout/css/channel.css" type="text/css">
    <script src="__STATIC__/layout/js/jquery.min.js?v=2.1.4"></script>
    <script src="__STATIC__/sc/js/page.js"></script>
</head>

<body style="color:#333;padding:3px;" class="x_sorll">
    <!-- 标题 -->
    <div class="page-heade">
      <h2 class="title_color text-center">AP费用已核销记录查询</h2>
    </div>
    <!-- 标题 -->
    <div class="row-margin-top">
    <form action="#" method="post" class="form-inline formpage" id="form_check">
               <input type="hidden" value='{$page}' name="page" id="page-go"/>
                      <input type="hidden" value='{$list}' name="list" id="list-go"/>
      <table class="row-margin-top tab-content table-bordered  table text-left" border="1">
          <tr>
            <td style="min-width: 120px;width: 120px" ><label for="" class="form-label">核销面单编号：</label></td>
            <td><input type="text" class="form-control" name="heno" value="{$data.heno}"></td>
              <td style="min-width: 120px;width: 120px" ><label for="" class="form-label">原申请编号：</label></td>
            <td><input type="text" class="form-control" name="no" value="{$data.no}"></td>
              <td style="min-width: 120px;width: 120px" ><label for="" class="form-label">供应商名称：</label></td>
            <td><input type="text" class="form-control" name="gys_name" value="{$data.gys_name}"></td>
              <td style="min-width: 120px;width: 120px" ><label for="" class="form-label">品牌名称：</label></td>
            <td>
               <select name="pbid" id="" class="form-control"  style="min-width: 130px;width: 130px">
                    <option value="0">请选择</option>
                     {volist name="branddata" id="b"}
                      {if condition="$data.pbid eq $b.id"}
                      <option value="{$b.id}" selected>{$b.brand_name}</option>
                      {else/}
                        <option value="{$b.id}">{$b.brand_name}</option>
                      {/if}
                    {/volist}
            </select>
            </td>
          </tr>
          <tr>
            <td style="min-width: 120px;width: 120px" ><label for="" class="form-label">费用明细：</label></td>
            <td>
               <select name="fid" id="" class="form-control"  style="min-width: 130px;width: 130px">
                    <option value="0">请选择</option>
                       {volist name="feidata" id="f"}
                      {if condition="$data.fid eq $f.id"}
                      <option value="{$f.id}" selected>{$f.title}</option>
                      {else/}
                      <option value="{$f.id}">{$f.title}</option>
                      {/if}
                    {/volist}
            </select>
            </td>
           <td style="min-width: 120px;width: 120px" ><label for="" class="form-label">申请人：</label></td>
            <td><input type="text" class="form-control" name="cname" value="{$data.cname}"></td>
           <td style="min-width: 120px;width: 120px" ><label for="" class="form-label">申请日期：</label></td>
            <td>
                 <div class="form-group">
            <input type="text" id="start" class="form-control layer-date " style="display: inline-block;min-width: 120px;width: 120px" name="start" value="{$data.start}">
           </div>
            <div class="form-group">
               至
            </div>
           <div class="form-group">
            <input type="text" class="form-control layer-date"  style="display: inline-block;min-width: 120px;width: 120px" id="end" name="end" value="{$data.end}">
           </div>
            </td>
          <td colspan="2">
         <button class="btn btn-info query" type="button" id="check">查询</button>
           <button class="btn btn-info emptyIf" type="button" id="clear_check">清空查询条件</button>
           <button class="btn btn-info LendExcel" type="button">导出Excel</button>
            </td>
          </tr>
      </table>
    
      <table class="table table-striped table-bordered text-center bud_hei">
        <!--<tr>
            <td colspan="22" class="text-left">
                <span style="color: blue">批复金额合计：</span>
                <span class="ObjectNum num2 font-bold"></span>
                <span style="color: blue">未核销金额合计：</span>
                <span class="ObjectNum font-bold"></span>
                <span style="color: blue">未税核销金额合计：</span>
                <span class="ObjectNum num2 font-bold"></span>
                <span style="color: blue">税金合计：</span>
                <span class="ObjectNum font-bold"></span>
                <span style="color: blue">含税核销金额合计：</span>
                <span class="ObjectNum font-bold"></span>
                <span style="color: blue">实际核销金额合计：</span>
                <span class="ObjectNum font-bold"></span>
            </td>
        </tr>-->
        <tr class="info">
            <td rowspan="2">序号</td>
            <td rowspan="2">明细编号</td>
            <td rowspan="2">原申请文件</td>
            <td rowspan="2">原明细编号</td>
            <td rowspan="2">供应商名称</td>
            <td rowspan="2">品牌名称</td>
            <td rowspan="2">三级费用科目</td>
            <td colspan="3">实际投入</td>
            <td colspan="8">本次申请核销</td>
            <td rowspan="2">活动开始日期</td>
            <td rowspan="2">支付方式</td>
            <td rowspan="2">备注</td>
            
        </tr>
         <tr class="info">
            <td>实际投入金额</td>
            <td>已核销金额</td>
            <td>未核销金额</td>
            <td>未税核销金额</td>
            <td>有无发票</td>
            <td>发票号</td>
            <td>是否增值税(可抵扣)</td>
            <td>税率</td>
            <td>税金</td>
            <td>含税核销金额</td>
            <td>实际核销金额</td>
        </tr>
        {volist name="applys" id="vo"}
            <tr>
                  <td>{$i}</td>
                  <td>{$vo.ahpno}_{$vo.he_detail_no}</td>
                  <td><a onclick="xiangqing({$vo.apid})">{$vo.apno}</a></td>
                  <td>{$vo.apno}_{$vo.detail_no}</td>
                  <td>{$vo.gys_name}</td>
                  <td>{$vo.brand}</td>
                  <td>{$vo.kemu3}</td>
                  <td class="text-right num2 ObjectNum">{$vo.touru}</td>
                  <td class="text-right num2 ObjectNum">{$vo.yihe}</td>
                  <td class="text-right num2 ObjectNum">{$vo.weihe}</td>
                  <td class="text-right num2 ObjectNum">{$vo.hexiao_weishui}</td>
                  <td>{if condition="$vo.has_fp eq 1"}有{else/}无{/if}</td>
                  <td>{$vo.fp_no}</td>
                  <td>{if condition="$vo.dikou eq 1"}是{else/}否{/if}</td>
                  <td><span class="num2 ObjectNum">{$vo.hexiao_shuilv}</span>%</td>
                  <td class="text-right num2 ObjectNum">{$vo.shuijin}</td>
                  <td class="text-right num2 ObjectNum">{$vo.hexiao_hanshui}</td>
                  <td class="text-right num2 ObjectNum">{$vo.hexiao_hanshui}</td>
                   <td>{$vo.start_time}</td>
                    <td>{$vo.zffs}</td><td>{$vo.beizhu}</td>
            </tr>
        {/volist}
       
       
        </table>
     <h5 class="text-center" id="pagesc" style="font-size: 16px;font-weight: 500">
            <script>
                            $(function(){
                                pageSC("pagesc",{$sum},{$page},{$maxpage})
                            })
                        </script> 
            每页显示
           <select id="pagesize">
                        <option value='10' {if condition="$list eq 10"}selected{/if}>10条</option>
                        <option value='15'{if condition="$list eq 15"}selected{/if}>15条</option>
                        <option value='20'{if condition="$list eq 20"}selected{/if}>20条</option>

            </select>
        </h5>
</form>
    </div>
    <!-- 全局js -->
    <!-- 全局js -->
    <script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
    <!-- <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> -->
    <script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
   <script src="__STATIC__/layout/js/plugins/layer/laydate/laydate.js"></script>
     <script src="__STATIC__/layout/js/plugins/sweetalert/sweetalert.min.js"></script>
         <script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>

 <script src="__STATIC__/layout/js/common.js"></script>
  <script src="__STATIC__/layout/js/plugins/layer/layer.min.js"></script>
    <script>
     $(".LendExcel").click(function(){
          location.href="{:url('daochu_allhexiao')}";
        })
//详情也
function xiangqing(aid){
     var index = layer.open({
                            type:2,
                            title:'常规促销申请',
                            area:['100%','100%'],
                            maxmin:true,
                            content:'{:url("Apapply/apply_de")}?aid='+aid
                        })
}
        //日期范围限制
        var start = {
            elem: '#start',
            format: 'YYYY-MM-DD',
           
            max: '2099-06-16 23:59:59', //最大日期
            istime: true,
            istoday: false,
            choose: function (datas) {
                end.min = datas; //开始日选好后，重置结束日的最小日期
                end.start = datas //将结束日的初始值设定为开始日
            }
        };
        var end = {
            elem: '#end',
            format: 'YYYY-MM-DD',
           
            max: '2099-06-16 23:59:59',
            istime: true,
            istoday: false,
            choose: function (datas) {
                start.max = datas; //结束日选好后，重置开始日的最大日期
            }
        };
        laydate(start);
        laydate(end);
        $(document).ready(function(){
               var $ObjectNum =$(".ObjectNum");
             toNum($ObjectNum);
        })
              //翻页
           
        $("#check").click(function(){
              $("#page-go").val(1);
              $(".formpage").submit();
        })
        $("#clear_check").click(function(){
            $("input[type='text']").val("");
             $("select").val(0);
            $("#page-go").val(1);
            $(".formpage").submit();
        })
    </script>
</body>

</html>
